package org.marsdonne.auth.resolver;

import graphql.kickstart.tools.GraphQLResolver;
import org.marsdonne.auth.EndPointUser;
import org.marsdonne.auth.UnionUser;
import org.springframework.stereotype.Component;

import javax.transaction.Transactional;

@Component
public class EndPointUserGenericsResolver implements GraphQLResolver<EndPointUser> {

    @Transactional
    public UnionUser getUnionUser(EndPointUser endPointUser) {
        return endPointUser.getUnionUser();
    }
}
